#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int main()
{
    int q;
    cin >> q;
    while (q--)
    {
        int n;
        cin >> n;
        vector<int> arr(n + 1);
        for (int i = 0; i < n; i++)
            cin >> arr[i];
        if (n == 1)
        {
            cout << 1 << endl;
            continue;
        }

        vector<int> left(n, 1);
        vector<int> right(n, 1); 

        for (int i = 1; i < n; i++) {
            if (arr[i] > arr[i - 1]) {
                left[i] = left[i - 1] + 1;
            }
        }

        for (int i = n - 2; i >= 0; i--) {
            if (arr[i] < arr[i + 1]) {
                right[i] = right[i + 1] + 1;
            }
        }

        int ans = *max_element(left.begin(), left.end());

        for (int i = 0; i < n; i++) {
            if (i == 0) {
                ans = max(ans, right[i + 1] + 1);
            }
            else if (i == n - 1) {
                ans = max(ans, left[i - 1] + 1);
            }
            else {
                if (arr[i - 1] < arr[i + 1]) {
                    ans = max(ans, left[i - 1] + right[i + 1] + 1);
                }
                else {
                    ans = max(ans, max(left[i - 1], right[i + 1]) + 1);
                }
            }
        }
        cout << ans << endl;
    }
    return 0;
}